<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<rapid:override name="head">
	<title>Booksku新增</title>
</rapid:override>

<rapid:override name="content">
	<c:choose>
		<c:when test="${empty sessionScope.bookId }">
			<form:form method="post"
				action="${ctx}/booksku"
				modelAttribute="booksku">
				<input id="submitButton" name="submitButton" type="submit"
					value="提交" />
				<input type="button" value="返回列表"
					onclick="window.location='${ctx}/booksku'" />
				<input type="button" value="后退" onclick="history.back();" />

				<table width="100%" border="0" cellspacing="0"
					class="table text-center">
					<%@ include file="form_include.jsp"%>
				</table>
			</form:form>
		</c:when>
		<c:otherwise>
			<form:form method="post"
				action="${ctx}/booksku/${sessionScope.bookId}/query"
				modelAttribute="booksku">
				<input id="submitButton" name="submitButton" type="submit"
					value="提交" />
				<input type="button" value="返回列表"
					onclick="window.location='${ctx}/booksku/${sessionScope.bookId}/query'" />
				<input type="button" value="后退" onclick="history.back();" />

				<table width="100%" border="0" cellspacing="0"
					class="table text-center">
					<%@ include file="form_include.jsp"%>
				</table>
			</form:form>
		</c:otherwise>
	</c:choose>


	<script>
		new Validation(document.forms[0], {
			onSubmit : true,
			onFormValidate : function(result, form) {
				var finalResult = result;

				//在这里添加自定义验证			
				return disableSubmit(finalResult, 'submitButton');
			}
		});
	</script>
</rapid:override>

<%@ include file="base.jsp"%>
